package com.yql.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yql.dao.BomDao;
import com.yql.entity.Bom;
import com.yql.entity.BomVO;
import com.yql.entity.Bommx;
import com.yql.service.BomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BomServiceImpl implements BomService {
    @Autowired
    BomDao bomDao;
    @Override
    public PageInfo<Bom> listBom(BomVO vo,Integer pageNum,Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        List<Bom> list = bomDao.listBom(vo);
        return new PageInfo<>(list);
    }

    @Override
    public List<Bommx> listBommx() {
        return bomDao.listBommx();
    }

    @Override
    public Integer deleteById(Integer id) {
        return bomDao.deleteById(id);
    }
}
